<template>
  <div class="payment-statistics">
    <div class="page-header">
      <h2>支付统计</h2>
      <p>查看支付相关的统计数据和收入分析</p>
    </div>
    
    <div class="statistics-content">
      <el-row :gutter="20">
        <el-col :span="6">
          <el-card>
            <div class="stat-item">
              <div class="stat-number">¥{{ totalRevenue }}</div>
              <div class="stat-label">总收入</div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="6">
          <el-card>
            <div class="stat-item">
              <div class="stat-number">¥{{ todayRevenue }}</div>
              <div class="stat-label">今日收入</div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="6">
          <el-card>
            <div class="stat-item">
              <div class="stat-number">{{ successfulPayments }}</div>
              <div class="stat-label">成功支付</div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="6">
          <el-card>
            <div class="stat-item">
              <div class="stat-number">{{ refundAmount }}</div>
              <div class="stat-label">退款金额</div>
            </div>
          </el-card>
        </el-col>
      </el-row>
      
      <div class="chart-container">
        <el-card>
          <h3>收入趋势图</h3>
          <div id="revenueChart" style="height: 400px;"></div>
        </el-card>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'PaymentStatistics',
  data() {
    return {
      totalRevenue: '125,680',
      todayRevenue: '3,240',
      successfulPayments: 1180,
      refundAmount: '2,150'
    }
  },
  mounted() {
    // 这里可以加载图表库和数据
    console.log('支付统计页面已加载')
  }
}
</script>

<style scoped>
.payment-statistics {
  padding: 20px;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h2 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
}

.page-header p {
  margin: 0;
  color: #666;
}

.stat-item {
  text-align: center;
  padding: 20px;
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  color: #67C23A;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.chart-container {
  margin-top: 20px;
}
</style> 